<?php
$this->pageTitle=Yii::app()->name . ' - Thông tin tài khoản';
$this->breadcrumbs=array(
	'Thông tin tài khoản',
);
?>
<div >
<h1>Thông tin tài khoản</h1>
<?php if(Yii::app()->user->hasFlash('success')){
 $this->widget('bootstrap.widgets.TbAlert', array(
        'block'=>true, // display a larger alert block?
        'fade'=>true, // use transitions?
        'closeText'=>'&times;', // close link text - if set to false, no close link is displayed
        'alerts'=>array( // configurations per alert type
            'success'=>array('block'=>true, 'fade'=>true, 'closeText'=>'&times;'), // success, info, warning, error or danger
        ),
    )); 
}else{ ?>
<div class="form">
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'user-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
	'htmlOptions' => array('enctype' => 'multipart/form-data'),
)); ?>
	<?php echo $form->errorSummary($model); ?>
	<div class="row">
		<?php echo $form->labelEx($model,'hoten'); ?>
		<?php echo $form->textField($model,'hoten'); ?>
		<?php echo $form->error($model,'hoten'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'email'); ?>
		<?php echo $form->emailField($model,'email'); ?>
		<?php echo $form->error($model,'email'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'ngaysinh'); ?>		
		<?php Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
		   	 $this->widget('CJuiDateTimePicker',array(
		        'model'=>$model, //Model object
		        'attribute'=>'ngaysinh', //attribute name
		                'mode'=>'date',//use "time","date" or "datetime" (default)
		        'options'=>array(), // jquery plugin options
		    	 'language' => ''
		    ));
		?>
		<?php echo $form->error($model,'ngaysinh'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'diachi'); ?>
		<?php echo $form->textArea($model,'diachi',array('size'=>60,'maxlength'=>128, 'style'=>'width:300px;')); ?>
		<?php echo $form->error($model,'diachi'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($model,'dienthoai'); ?>
		<?php echo $form->textField($model,'dienthoai',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'dienthoai'); ?>
	</div>
	<?php if(CCaptcha::checkRequirements()): ?>
	<div class="row">
		<?php echo $form->labelEx($model,'verifyCode'); ?>
		<div>
		<?php $this->widget('MyCaptcha'); ?>
		<?php echo $form->textField($model,'verifyCode'); ?>
		</div>
		<?php echo $form->error($model,'verifyCode'); ?>
	</div>
	<?php endif; ?>
	<div class="row buttons">
		<?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'label'=>'Đồng ý', 'type'=>'inverse','htmlOptions'=>array('id'=>'submit'))); ?>
	</div>
<?php $this->endWidget(); ?>
</div></div>
<?php } ?>